<?	
	/* Se asegura que el archivo es incluido por el index */
	defined( 'LOAD_MODULE_ACTION' ) or die( 'No esta permitido el acceso directo a ' . __FILE__ );  
		$this->oTmpObject = new Importar_frm( $this );
	
	class Importar_frm extends Frm
	{

	function autoRefresh()
	{
		$this->make();
	}
	function Importar_frm( &$oModule )
		{
			$this->Frm( $oModule );
			//Crea los Objetos de los campos de edicion
			//$this->aFields['cTabla']			= new InputText( "cTabla" );
			$this->aFields['cNombre']			= new InputText( "Nombre", "cNombre" );
			$this->aFields['cNombrePlural']		= new InputText( "Plural", "cNombrePlural" );
			$this->aFields['cPathModule'] 			= new InputList( "Modulo", "cPathModule" );
			$this->aFields['ncSubModulo']		= new InputList( "Submodulo", "ncSubModulo" );
			$this->aFields['cRpt']				= new InputList( "Template", "cRpt" );
			$this->setTarget("_blank");
		}	
	function initializeForm()
		{
			// Configura el Titulo
				$this->setLabel( "Accion" );
			return true;
		}
	function initializeField( $cField , &$oField )
		{			
			switch ( $cField )
			{
				case 'cRpt':
						$oField->setDirectory( $this->oModule->cPathRpt . "/accion_lst" );
				break;
				case 'cPathModule':
					$oField->setForm( $this );
					initializeModulo( $oField );
					$oField->setOnChangeAutoSubmit($this);
				break;
				case 'ncSubModulo':
					if ( getParam ('cPathModule') ) 
					{
						$oDatabase= openMetadataDB ( getParam('cPathModule') );
						$cSql = "SELECT ncSubModulo, cdSubModulo FROM stSubModulo ";
						$oField->setMatrix( $oDatabase->getMatrix( $cSql )  );
						$oField->setForm( $this );
						$oField->addActionArray ( 2, $this->oModule->getActionArray( AGREGAR_UN_SUBMODULO ), "cPathModule=" . getParam ('cPathModule') );
						}
				break;
			}
 		}
	}
?>